home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / mkmf / RCS / mkmf.biglibtop,v < prev    next >
Encoding:
Text File  |  1991-04-11  |  4.9 KB  |  272 lines

  1. head     1.8;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @@;
  7.  
  8.  
  9. 1.8
  10. date     91.04.11.12.53.33;  author kupfer;  state Exp;
  11. branches ;
  12. next     1.7;
  13.  
  14. 1.7
  15. date     89.10.09.21.28.33;  author rab;  state Exp;
  16. branches ;
  17. next     1.6;
  18.  
  19. 1.6
  20. date     89.08.18.11.21.48;  author douglis;  state Exp;
  21. branches ;
  22. next     1.5;
  23.  
  24. 1.5
  25. date     89.08.17.11.16.09;  author douglis;  state Exp;
  26. branches ;
  27. next     1.4;
  28.  
  29. 1.4
  30. date     89.04.06.21.40.38;  author jhh;  state Exp;
  31. branches ;
  32. next     1.3;
  33.  
  34. 1.3
  35. date     88.12.31.14.45.24;  author ouster;  state Exp;
  36. branches ;
  37. next     1.2;
  38.  
  39. 1.2
  40. date     88.11.27.16.29.00;  author ouster;  state Exp;
  41. branches ;
  42. next     1.1;
  43.  
  44. 1.1
  45. date     88.08.20.12.58.43;  author ouster;  state Exp;
  46. branches ;
  47. next     ;
  48.  
  49.  
  50. desc
  51. @@
  52.  
  53.  
  54. 1.8
  55. log
  56. @Flush DEFTARGET: the default target is now determined by a pmake
  57. library file.
  58. @
  59. text
  60. @#!/sprite/cmds/csh -f
  61. #
  62. # A script to generate (or regenerate) a Makefile for the topmost directory
  63. # of a library that is divided up into subdirectories.  This direcctory is
  64. # little more than a container for lots of subdirectories that have the
  65. # interesting stuff in them.
  66. #
  67. # We assume we were invoked from mkmf.
  68. #
  69. # Parameters passed in from mkmf as environment variables:
  70. #
  71. #    MKMFDIR        directory containing prototype makefiles
  72. #    MAKEFILE    name of makefile to create
  73. #    MACHINES    list of machine names (e.g. "sun2 sun3"), for
  74. #            which there are machine-dependent subdirectories
  75. #            (sun3.md, spur.md, etc.) of this directory.
  76. #    SUBTYPE        what sort of library this is:  "sprite", "x", etc.
  77. #            Used to determine where to install things.
  78. #
  79. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.7 89/10/09 21:28:33 rab Exp Locker: kupfer $ (SPRITE) Berkeley
  80. #
  81.  
  82. #
  83. # Argument processing.  (Generalized form, even though just one flag so far.)
  84. #
  85. while ($#argv >= 1)
  86.     if ("$1" == '-x') then
  87.     set echo
  88.     endif
  89.     shift
  90. end
  91.  
  92. set subtype=$SUBTYPE
  93. set lib=$cwd:t
  94. set machines=($MACHINES)
  95. set makefile=$MAKEFILE
  96. set distdir=($DISTDIR)
  97.  
  98. if (-e $makefile.proto) then
  99.     set proto=$makefile.proto
  100. else
  101.     set proto="${MKMFDIR}/Makefile.biglibtop"
  102. endif
  103.  
  104. echo "Generating $makefile for $cwd using $proto"
  105.  
  106. set subDirs="`find * -type d ! -name \*.md ! -name RCS -prune -print`"
  107. if ("$subDirs" == "") then
  108.     echo "No subdirectories found."
  109. endif
  110.  
  111. set nonomatch
  112. set manPages = (*.man)
  113. if ("$manPages" == "*.man") set manPages=()
  114.  
  115. cat $proto | sed \
  116.     -e "s,@@(DATE),`date`,g" \
  117.     -e "s,@@(MAKEFILE),$makefile,g" \
  118.     -e "s,@@(MANPAGES),$manPages,g" \
  119.     -e "s,@@(MACHINES),$machines,g" \
  120.     -e "s,@@(NAME),$lib,g" \
  121.     -e "s,@@(SUBDIRS),$subDirs,g" \
  122.     -e "s,@@(TEMPLATE),$proto,g" \
  123.     -e "s,@@(TYPE),$subtype,g" \
  124.     -e "s,@@(DISTDIR),$distdir,g" \
  125.     > $makefile
  126. @
  127.  
  128.  
  129. 1.7
  130. log
  131. @Modifications for distribution.
  132. @
  133. text
  134. @a11 1
  135. #    DEFTARGET    name of default target
  136. d20 1
  137. a20 1
  138. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.6 89/08/18 11:21:48 douglis Exp Locker: rab $ (SPRITE) Berkeley
  139. a36 1
  140. set defTarget=($DEFTARGET)
  141. a57 1
  142.     -e "s,@@(DEFTARGET),${defTarget:q},g" \
  143. @
  144.  
  145.  
  146. 1.6
  147. log
  148. @another change for TM -- use single machine if it exists, else \ds3100
  149. @
  150. text
  151. @d21 1
  152. a21 1
  153. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.4 89/04/06 21:40:38 jhh Exp Locker: douglis $ (SPRITE) Berkeley
  154. d39 1
  155. d68 1
  156. @
  157.  
  158.  
  159. 1.5
  160. log
  161. @removed DEFTARGET -- we use $MACHINE now
  162. @
  163. text
  164. @d12 1
  165. d38 1
  166. d59 1
  167. @
  168.  
  169.  
  170. 1.4
  171. log
  172. @added abilty to make specific machine types
  173. @
  174. text
  175. @a11 1
  176. #    DEFTARGET    name of default target
  177. d20 1
  178. a20 1
  179. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.3 88/12/31 14:45:24 ouster Exp Locker: jhh $ (SPRITE) Berkeley
  180. a36 1
  181. set defTarget=($DEFTARGET)
  182. a56 1
  183.     -e "s,@@(DEFTARGET),$defTarget,g" \
  184. @
  185.  
  186.  
  187. 1.3
  188. log
  189. @Use TYPE instead of INSTALLDIR, INSTALLMAN, etc.
  190. @
  191. text
  192. @d11 2
  193. d21 1
  194. a21 1
  195. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.2 88/11/27 16:29:00 ouster Exp Locker: ouster $ (SPRITE) Berkeley
  196. d38 1
  197. a46 6
  198.  
  199. if (" $machines " =~ *\ sun3\ *) then
  200.     set defTarget=sun3
  201. else
  202.     set defTarget=$machines[1]
  203. endif
  204. @
  205.  
  206.  
  207. 1.2
  208. log
  209. @Various changes to replace old C library entirely with new C library.
  210. @
  211. text
  212. @d19 1
  213. a19 1
  214. # $Header: /sprite/lib/mkmf/RCS/mkmf.biglibtop,v 1.1 88/08/20 12:58:43 ouster Exp Locker: ouster $ (SPRITE) Berkeley
  215. a35 15
  216. switch ($subtype)
  217.     case sprite:
  218.     set installdir=/sprite/lib
  219.     set installman=/sprite/doc/ref/lib/$lib
  220.     set lintdir=/sprite/lib/lint
  221.     breaksw
  222.     case x:
  223.     set installdir=/X/lib
  224.     set installman=/X/doc/ref/lib/$lib
  225.     set lintdir=/X/lib/lint
  226.     breaksw
  227.     default:
  228.     echo Unknown library subtype "$subtype"
  229.     exit 1
  230. endsw
  231. a62 3
  232.     -e "s,@@(INSTALLDIR),$installdir,g" \
  233.     -e "s,@@(INSTALLMAN),$installman,g" \
  234.     -e "s,@@(LINTDIR),$lintdir,g" \
  235. d69 1
  236. @
  237.  
  238.  
  239. 1.1
  240. log
  241. @Initial revision
  242. @
  243. text
  244. @d17 1
  245. d19 1
  246. a19 1
  247. # $Header: mkmf.top,v 1.6 88/08/12 14:38:30 ouster Exp $ (SPRITE) Berkeley
  248. d33 3
  249. d39 1
  250. d43 3
  251. a45 2
  252.     set installdir=/sprite/lib
  253.     set lintdir=/sprite/lib/lint
  254. a50 3
  255. set lib=$cwd:t
  256. set machines=($MACHINES)
  257. set makefile=$MAKEFILE
  258. a66 1
  259.  
  260. d71 4
  261. d76 1
  262. a76 2
  263.     -e "s,@@(LIBRARY),$lib,g" \
  264.     -e "s,@@(MACHINES),$machines,g" \
  265. a77 1
  266.     -e "s,@@(SUBDIRS),$subDirs,g" \
  267. d79 1
  268. d82 4
  269. a86 1
  270.     -e "s,@@(DATE),`date`,g" \
  271. @
  272.